package org.hit.burkun.obo.model;

import java.util.Collection;
import java.util.LinkedList;

/*
 * http://oboformat.googlecode.com/svn/trunk/doc/GO.format.obo-1_2.html
 */
/**
 */
public class Term {
	// The unique id of the current term.
	private String id;
	// The term name. Any term may have only one name defined. If multiple term
	// names are defined, it is a parse error.
	private String name;

	// The definition of the current term. There must be zero or one instances
	// of this tag per term description. More than one definition for a term
	// generates a parse error. The value of this tag should be the quote
	// enclosed definition text, followed by a dbxref list containing dbxrefs
	// that describe the origin of this definition (see dbxref formatting for
	// information on how dbxref lists are encoded). An example of this tag
	// would look like this:
	// def:
	// "The breakdown into simpler components of (+)-camphor, a bicyclic monoterpene ketone."
	// [UM-BBD:pathway "", http://umbbd.ahc.umn.edu/cam/cam_map.html ""]
	private String def;
	// A comment for this term. There must be zero or one instances of this tag
	// per term description. More than one comment for a term generates a parse
	// error.
	private String comment;
	// This tag indicates a term subset to which this term belongs. The value of
	// this tag must be a subset name as defined in a subsetdef tag in the file
	// header. If the value of this tag is not mentioned in a subsetdef tag, a
	// parse error will be generated. A term may belong to any number of
	// subsets.
	private Collection<Subset> subsets = new LinkedList<Subset>();
	// This tag gives a synonym for this term, some xrefs to describe the
	// origins of the synonym, and may indicate a synonym category or scope
	// information.
	// The value consists of a quote enclosed synonym text, an optional scope
	// identifier, an optional synonym type name, and an optional dbxref list,
	// like this:
	// synonym: "The other white meat" EXACT MARKETING_SLOGAN [MEAT:00324,
	// BACONBASE:03021]
	// The synonym scope may be one of four values: EXACT, BROAD, NARROW,
	// RELATED. If the first form is used to specify a synonym, the scope is
	// assumed to be RELATED.
	// The synonym type must be the id of a synonym type defined by a
	// synonymtypedef line in the header. If the synonym type has a default
	// scope, that scope is used regardless of any scope declaration given by a
	// synonym tag.
	// The dbxref list is formatted as specified in dbxref formatting. A term
	// may have any number of synonyms.
	private Collection<Synonym> synonyms = new LinkedList<Synonym>();// include
																		// alt_id;

	// A dbxref that describes an analagous term in another vocabulary (see
	// dbxref formatting for information about how the value of this tag must be
	// formatted). A term may have any number of xrefs.
	private Collection<Dbxref> xrefs = new LinkedList<Dbxref>();
	private Collection<Relationship> relations = new LinkedList<Relationship>();
	// the term is obsolete
	private boolean is_obsolete = false;
	// Gives a term which may be an appropriate substitute for an obsolete term,
	// but needs to be looked at carefully by a human expert before the
	// replacement is done.
	// This tag may only be specified for obsolete terms. A single obsolete term
	// may have many consider tags. This tag can be used in conjunction with
	// replaced_by.
	private Collection<String> considers = new LinkedList<String>();
	// namesapce
	private String namesapce;

	// Whether or not the current object has an anonymous id
	// private Useless is_anonymous;
	// private Useless intersection_of;
	// private Useless union_of;
	// private Useless disjoint_from;
	// private Useless repalced_by;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDef() {
		return def;
	}

	public void setDef(String def) {
		this.def = def;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public void setSynonyms(Collection<Synonym> synonyms) {
		this.synonyms = synonyms;
	}

	public void setXrefs(Collection<Dbxref> xrefs) {
		this.xrefs = xrefs;
	}

	public void setRelations(Collection<Relationship> relations) {
		this.relations = relations;
	}

	public Collection<Synonym> getSynonyms() {
		return synonyms;
	}

	public Collection<Dbxref> getXrefs() {
		return xrefs;
	}

	public String getNamesapce() {
		return namesapce;
	}

	public void setNamesapce(String namesapce) {
		this.namesapce = namesapce;
	}

	public Collection<Relationship> getRelations() {
		return relations;
	}

	public boolean isIs_obsolete() {
		return is_obsolete;
	}

	public void setIs_obsolete(boolean is_obsolete) {
		this.is_obsolete = is_obsolete;
	}

	public Collection<String> getConsiders() {
		return considers;
	}

	public void setConsiders(Collection<String> considers) {
		this.considers = considers;
	}

	public Collection<Subset> getSubsets() {
		return subsets;
	}

	public void setSubsets(Collection<Subset> subsets) {
		this.subsets = subsets;
	}
}
